<template>
    <div>
        <Header>
            <template v-slot:title>
                套卷练习
            </template>
             <template v-slot:right>
                <van-icon name="search"  @click="$router.push('/Practivesearch')"/>
            </template>
        </Header>
        <van-dropdown-menu>
  <van-dropdown-item v-model="value" title="套卷状态"  :options="option"/>
  <van-dropdown-item title="筛选" ref="item">
   <van-row >
  <van-col span="6">
    <van-sidebar v-model="activeKey" >
     <van-sidebar-item  title="全部" />
  <van-sidebar-item v-for="item in list" :key="item.id" :title="item.name" @click="shuju(item)" />
</van-sidebar>

</van-col>
  <van-col span="18" style="background:#fff;"  >
   <div class="box" v-for="ite in arr.children" :key="ite.id">
    <p>{{ite.name}}</p>
   </div>
  </van-col>
</van-row>
  </van-dropdown-item>
</van-dropdown-menu>
        <div class="text">
            <img src="../../assets/ks.png" alt="">
            <p>请稍等，套卷正在赶来的路上</p>
        </div>
    </div>
</template>

<script>
import Header from '../Bar.vue'
import { liexi ,liexis} from "../../Request/http";
export default {
    components:{Header},
    name: 'EverydayPaperPage',

    data() {
        return {
               value: 0,
      switch1: false,
      switch2: false,
      option: [
        { text: '全部', value: 0 },
        { text: '已做', value: 1 },
        { text: '未做', value: 2 },
      ],
      list:[],
      activeKey:0,
      arr:[]
        };
    },

    mounted() {
        liexi().then(res=>{
            console.log(res);
            this.list=res.rows
        })
    },

    methods: {
        zt(){
              liexis({done_status:1,classify_id:0,name:''}).then(res=>{
            console.log(res);
        })
        },
        shuju(val){
            this.arr=val
            console.log(val);
        //      liexi().then(res=>{
        //     console.log(res);
        //     this.list=res.rows
        // })
            
             liexis({done_status:0,classify_id:16,name:''}).then(res=>{
            console.log(res);
        })
            
        },
        onConfirm() {
      this.$refs.item.toggle();
    },
    },
};
</script>

<style lang="scss" scoped>
.text{
    text-align: center;
    width: 100%;
    img{
        text-align: center;
        width: 100%;
    }
}
</style>